<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>监听事件</title>
    <script src="./vue.js"></script>
</head>
<body>
    <div id="app">
        <p>点击次数：{{counter}}</p>
        <button v-on:click="counter += 1">加 1</button>
    </div>
</body>
<script>
    var vm = new Vue({
        el: '#app',
        data: {
            counter: 0
        }
    })
</script>
</html>